﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Server.Model;
using Server.DB;

namespace Server.Controller
{
    class UserController : IUserController
    {
        private Context db;
        private Repository<User> UserRepository;

        public UserController(Context db)
        {
            this.db = db;
            UserRepository = new Repository<User>(db);
        }

        public User UpdateUser(User user)
        {
            UserRepository.Update(user);
            UserRepository.Save();
            return user;
        }
    }
}
